package com.jumi.microservice.dto.export;

import com.jumi.microservice.common.base.dto.BaseRequest;
import com.jumi.microservice.common.exception.BaseException;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author wangjingdao
 */
public class ExportCapitalRequest extends BaseRequest {
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("会员等级")
    private Integer membershipLevel;
    @ApiModelProperty("类型")
    private Byte type;
    @ApiModelProperty("开始时间")
    private String startTime;
    @ApiModelProperty("结束时间")
    private String endTime;
    @ApiModelProperty("id")
    private String ids;

    @Override
    public void checkRequest() {
        if(this.getEndTime()==null && this.getMembershipLevel()==null && (this.getPhone()==null || this.getPhone().trim().isEmpty()) &&
                this.getStartTime()==null && this.getType()==null){
            throw new BaseException(500,"请先选择搜索条件");
        }
    }


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getMembershipLevel() {
        return membershipLevel;
    }

    public void setMembershipLevel(Integer membershipLevel) {
        this.membershipLevel = membershipLevel;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }
}
